package cc.wanforme.fsync.client;

import cc.wanforme.fsync.entity.device.HeartBeat;
import cc.wanforme.st.server.vo.ResMessage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

@RestController
@RequestMapping("/client")
public class TestClientController {

    @Autowired
    private ClientCenter clientCenter;


    // 心跳，状态上报
    @PostMapping("/test-beat")
    @ResponseBody
    public ResMessage<HeartBeat> heartbeat() throws IOException {
        HeartBeat heartBeat = clientCenter.heartBeat();
        return ResMessage.success(heartBeat);
    }



}
